<?php

namespace app\index\model;

use think\Model;

class Yonghu extends Model
{
    // 表名
    protected $table = 'yonghu';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;

    // 定义时间戳字段名
    protected $createTime = false;
    protected $updateTime = false;
    
    // 追加属性
    protected $append = [

    ];

    public function yonghubian()
    {
        return $this->belongsTo('YonghuBian', 'id', 'yh_id', [], 'LEFT')->setEagerlyType(0);
    }

    public function jujian()
    {
        return $this->belongsTo('Jujian', 'jujian_id', 'id', [], 'LEFT')->setEagerlyType(0);
    }

    public function luyouzu()
    {
        return $this->belongsTo('LuyouZu', 'luyou_zu_id', 'id', [], 'LEFT')->setEagerlyType(0);
    }

    public function baozhengzu()
    {
        return $this->belongsTo('BaozhengZu', 'baozheng_zu_id', 'id', [], 'LEFT')->setEagerlyType(0);
    }
}
